home *** CD-ROM | disk | FTP | other *** search
/ Gold Medal Software 2 / Gold Medal Software Volume 2 (Gold Medal) (1994).iso / utils / tmap101.arj / TMAP.TXT < prev   
Text File  |  1993-12-13  |  5KB  |  97 lines

  1.      TMAP presents a graphical display of the fragmentation of
  2.      the clusters on any disk.
  3.      
  4.      What's a Cluster?
  5.      
  6.      In the DOS world, disk space is allocated to files on an as-
  7.      needed basis. The basic storage unit is called a cluster,
  8.      and the size of a cluster varies by type of disk and by disk
  9.      format.  Typical floppy disks have cluster sizes of 1024
  10.      bytes, while on a hard disk a cluster may range from 2048 to
  11.      16384 bytes depending on the capacity of the disk.  There
  12.      are tens of thousands of clusters (allocation units) on a
  13.      hard disk; the FORMAT command determines these sizes.
  14.      
  15.      The clusters are numbered and a file consists of one or more
  16.      clusters.  A directory entry is little more than a file's
  17.      name, date, time and the disk's file allocation table (FAT)
  18.      entry that represents the first cluster of the file's
  19.      contents.  The ordered list of actual cluster numbers for
  20.      the file are coded in the FAT.  This tells the sequence in
  21.      which the clusters must be read or written so the individual
  22.      pieces of the file get accessed in the right order.
  23.      
  24.      What's Fragmentation?
  25.      
  26.      Fragmentation is the natural consequence of creating and
  27.      deleting files on most file systems.  Since a file is made
  28.      up of one or more clusters whose order is known, a file may
  29.      be spread out all over the disk.  Reading and writing the
  30.      file is easy as DOS just follows the chain in the FAT.  But
  31.      jumping all over the disk, reading and writing bits and
  32.      pieces, slows things down.  In addition, if the pieces of a
  33.      file are not together, we say the file is fragmented, and it
  34.      can be extremely difficult to unerase or to recover it if
  35.      destroyed, deleted or lost somehow.
  36.      
  37.      TMAP merely shows the relative level of fragmentation of all
  38.      the files on the disk.  Since there are only 1560 display
  39.      positions on TMAP's display, we make each position represent
  40.      more than one cluster.  The symbol displayed is therefore a
  41.      composite of those adjacent clusters grouped together.  The
  42.      scale, or the number of clusters represented by each symbol,
  43.      is notated above the map.
  44.      
  45.      The idea for TMAP came from a utility program called VMAP
  46.      from Golden Bow Systems of San Diego.  According to a
  47.      representative of Golden Bow, VMAP and its mainstream disk
  48.      de-fragmenter product, VOPT, were distributed together as
  49.      demos (the VOPT demo went through the actions but didn't
  50.      actually change the disk). They ended up on bulletin boards
  51.      around the country.  When VMAP was written (1987 timeframe),
  52.      hard disks were relatively small.  An earlier version of
  53.      VMAP didn't work on disk partitions larger than 32
  54.      megabytes.  A subsequent version only worked properly on
  55.      partitions smaller than 128 Mb.  The reason?  The size of
  56.      the disk's file allocation table (FAT) changes as disk
  57.      partitions get larger. On the version I used, VMAP assumed
  58.      it could read the FAT as a single 64k block.  However, on
  59.      disks larger than 128 Mb, the FAT size exceeded 64k and VMAP
  60.      did not work right.
  61.      
  62.      So, Now What?
  63.      
  64.      Every user of DOS should have a utility program that does
  65.      maintenance on his own hard disk.  Besides frequently
  66.      running CHKDSK to ensure consistency in the file system,
  67.      Golden Bow's VOPT utility does a stellar job of
  68.      defragmenting; I highly recommend it. Norton's Speed Disk
  69.      works great too.  Personally I like ORG, a shareware disk
  70.      organizer written by Grevé and Rifkind.  A defragmenter
  71.      comes with DOS 6.
  72.      
  73.      This program was authored by Ronald E. Raikes out of our
  74.      mutual desire to have a "VMAP" that worked with our large
  75.      disks.  Ron wanted it to be a character-based utility that
  76.      would function over his serial port.  With his permission, I
  77.      have modified his character-based version, changing the
  78.      output format, adding color and doing additional testing on
  79.      other hardware and DOS versions using Borland C++.  It looks
  80.      very much like the old VMAP from Golden Bow.
  81.      
  82.      I've tested TMAP with a wide range of types and sizes of
  83.      floppy and hard disks (ESDI, IDE, etc) on a variety of
  84.      machines and display adapters. It executes under DOS 4.01
  85.      and above, including DOS 6.0 and Novell DOS 7 (Beta 4). I
  86.      have not tried it on a Doublespaced volume.
  87.      
  88.      The day prior to the day I planned to upload TMAP, a friend
  89.      gave me a version of VMAP that I didn't even know existed.
  90.      Voila, here was the version I had wanted all along!  I'm
  91.      pleased to report we get the same display...
  92.      
  93.      Thomas M. Allen
  94.      North Orange County Computer Club (NOCCC), Orange CA
  95.      72537.1134@compuserve.com
  96.      13 December 1993
  97.